package com.literature.threeGroup.service;

import com.literature.threeGroup.pojo.Menu;
import com.literature.threeGroup.pojo.MenuRole;
import com.literature.threeGroup.pojo.Role;
import com.literature.threeGroup.util.PageResult;
import com.literature.threeGroup.vo.UserRole;

import java.net.UnknownHostException;
import java.util.List;

/**
 * @author VULCAN
 * @create 2020-01-07 14:30
 * @desc
 **/
public interface RoleService {

    /**
      * @name  角色添加
     * @Author VULCAN
     * @Date 2020/1/11 9:58
     */
    void insertrole(Role role);

    /**
      * @name  角色列表
     * @Author VULCAN
     * @Date 2020/1/11 9:58
     */
    List<Role> findallrole();

    /**
      * @name  统计数量
     * @Author VULCAN
     * @Date 2020/1/11 9:58
     */
    List<Role> findallrolecount();
    /**
     * @name  分页 模糊
     * @Author VULCAN
     * @Date 2020/1/10 19:59
     */
    PageResult findallrolenamecount(Role role, int pageNum, int pageSize);
    /**
     * @name  批量删除
     * @Author VULCAN
     * @Date 2020/1/17 10:00
     */
    String rolebulkdel(String[] ids) throws UnknownHostException;
    /**
     * @name  角色添加
     * @Author VULCAN
     * @Date 2020/1/17 12:45
     */
    void rolebulkadd(String[] ids, Role role) throws UnknownHostException;
    /**
     * @name  根据id查询
     * @Author VULCAN
     * @Date 2020/1/9 19:22
     */
    Role findbyroleid(String roleId);
    /**
     * @name  修改数据
     * @Author VULCAN
     * @Date 2020/1/9 19:22
     */
//    void roleupdate(Role role);
    /**
      * @name  回显中简表数据
     * @Author VULCAN
     * @Date 2020/1/17 15:32
     */
    void rolemenuupdate(MenuRole menuRole);
    /**
     * @name  权限角色根据id查询
     * @Author VULCAN
     * @Date 2020/1/21 19:13
     */
    List<MenuRole> findbyrolemenuid(String roleId);
    /**
     * @name  角色修改
     * @Author VULCAN
     * @Date 2020/1/21 19:13
     */
    void roleupdate(String[] ids, Role role) throws UnknownHostException;

    /**
     * @name  rolecount
     * @Author VULCAN
     * @Date 2020/1/11 10:01
     */
    List rolecount();
}
